#ifndef PCAPMSG_H
#define PCAPMSG_H
#include "InterfacePackOperation.h"
#include "InetIpv4.h"
#include "InetTcp.h"


namespace Pacap {


class PcapMsg : public InterfacePackOperation
{
public:
    PcapMsg()=default;
    virtual ~PcapMsg()=default;
public:
    virtual PackType pack() override;
    virtual void unpack(PackType hexData) override;

//    PcapEthernet *getEthernet() const;
//    void setEthernet(PcapEthernet *value);

    InetIpv4 *getInternetIp() const;
    void setInternetIp(InetIpv4 *value);

    InetTcp *getTcp() const;
    void setTcp(InetTcp *value);

    PackType getApplicationData() const;
    void setApplicationData(const PackType &value);

private:
    //    PcapEthernet* Ethernet=nullptr;   //Ethernet

    InetIpv4* InternetIp = nullptr;   //InternetIp

    InetTcp* TcpProtocol = nullptr;// TcpProtocol
    PackType applicationData;       //应用层数据
};

}

#endif // PCAPMSG_H
